System Call


Q1.

The following C program: { fork(); fork(); printf("yes"); }If we execute this core segment, how many times the string yes will be printed?
GateOverflow

Q2.

Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?
GateOverflow

Q3.

The difference between a named pipe and a regular file in Unix is that
GateOverflow

Q4.

The following C program is executed on a Unix / Linux system: #include < unistd.h > int main() { int i; for (i = 0; i < 10; i++) if (i % 2 == 0) fork(); return 0; } The total number of child process created is __________ .
GateOverflow

Q5.

Which of the following standard C library functions will always invoke a system call when executed from a single-threaded process in a UNIX/Linux operating system?[MSQ]
GateOverflow

Q6.

The Linux command mknod myfifo b 4 16
GateOverflow

Q7.

Wha is the output of the following program? main() { int a = 10; if(fork()) == 0)) a++; printf("%d\n",a); }
GateOverflow

Q8.

Consider the following program. main() { fork(); fork(); fork(); }How many new processes will be created?
GateOverflow

Q9.

Which of the following UNIX command allows scheduling a program to be executed at the specifies time?
GateOverflow

Q10.

A process executes the code fork(); fork(); fork(); The total number of child processes created is
GateOverflow